const Sequelize = require('sequelize')
const db = require('../../config/mysql')

const User = db.define('user', {
  id: {
      type: Sequelize.BIGINT,
      primaryKey: true
  },
  username: Sequelize.CHAR(100),
  password: Sequelize.CHAR(100),
  account: Sequelize.CHAR(100),
  ctime: Sequelize.CHAR(100),
  role_id: Sequelize.NUMBER,
  role_name: Sequelize.CHAR(100),
  permissions: Sequelize.ARRAY(Sequelize.TEXT)
}, {
  tableName: 'user',
  timestamps: false
})

module.exports = User
